<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
{eval $user=$this->user; $setting=$this->setting;}
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Manyou's Control Panel</title>
        <meta http-equiv="Content-Type" content="text/html; charset={MY_CHARSET}">
        <link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
		<style type="text/css">
		 .icon{display:block;margin:0px;height:20px;width:20px;background:url(js/xheditor/xheditor_skin/default/img/icons.gif) no-repeat }
		.BtnCut {background-position:-20px 0 }
		.BtnCopy {background-position:-20px 0}
		.BtnPaste {background-position:-40px 0}
		.BtnPastetext {background-position:-60px 0}
		.BtnBlocktag {background-position:-80px 0}
		.BtnFontface {background-position:-100px 0}
		.BtnFontSize {background-position:-120px 0}
		.BtnBold {background-position:-140px 0}
		.BtnItalic {background-position:-160px 0}
		.BtnUnderline {background-position:-180px 0}
		.BtnStrikethrough {background-position:-200px 0}
		.BtnFontColor {background-position:-220px 0}
		.BtnBackColor {background-position:-240px 0}
		.BtnSelectAll {background-position:-260px 0}
		.BtnRemoveformat {background-position:-280px 0}

		.BtnAlign {background-position:-300px 0}
		.BtnList {background-position:-320px 0}
		.BtnOutdent {background-position:-340px 0}
		.BtnIndent {background-position:-360px 0}

		.BtnLink {background-position:-380px 0}
		.BtnUnlink {background-position:-400px 0}
		.BtnImg {background-position:-420px 0}
		.BtnFlash {background-position:-440px 0}
		.BtnMedia {background-position:-460px 0}
		.BtnEmot {background-position:-480px 0}
		.BtnTable {background-position:-500px 0}

		.BtnSource {background-position:-520px 0}
		.BtnPreview {background-position:-540px 0}
		.BtnPrint {background-position:-560px 0}
		.BtnFullscreen {background-position:-580px 0}
		
		.Separator{background-position:-620px 0}

		</style>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jqueryui.js"></script>
        <script type="text/javascript" src="js/admin.js" ></script>
    </head>
    <body>
        <div id="append">
        </div>
        <div class="container">
            <!--{if !empty($message)}-->
            <!--{eval $type=isset($type)?$type:'correctmsg'; }-->
            <div class="{$type}"><p>{$message}</p></div>
            <!--{/if}-->

            <div class="hastabmenu" style="height:30px">
                <ul class="tabmenu">
                    <li ><a href="index.php?admin_editor/setting{$setting['seo_suffix']}">全局设置</a> </li>
                    <li class="tabcurrent"><a  href="index.php?admin_editor/default{$setting['seo_suffix']}">编辑器功能</a></li>
                </ul>
            </div>

            <div class="mainbox">
                <table class="datalist fixwidth">
                    <tr>
                        <th width="22%">标签</td>
                        <th width="15%">图标</td>
                        <th width="15%">简介</td>
                        <th >状态[操作]</td>
                    </tr>
                    <tr>
                        <td colspan="4" >
                            <ul id="list" style="cursor: hand; cursor: pointer;" >
                                <!--{loop $toolbarlist $toolbar}-->

                                <li style="list-style:none;">
                                    <table width="60%" style="text-align:left;" class="xhe_default">
                                        <tr>
                                            <td width="15%">{$toolbar['tag']}    <input type="hidden" name="id[]" value="{$toolbar['id']}" /></td>
                                            <td width="10%">
                                            <!--{if '|'==$toolbar['tag'] }-->
                                            	<div class="icon Separator"/> 
                                            <!--{else}-->
												<div class="icon Btn{$toolbar['tag']}"/> 
                                            <!--{/if}-->
                                            </td>
                                            <td width="10%">{$toolbar['description']}</td>
                                            <td width="5%">
												 <!--{if $toolbar['available'] }-->已启用
													<a style="color: green" href="index.php?admin_editor/status/{$toolbar['id']}/0{$setting['seo_suffix']}">[禁用]</a>
												 <!--{else}-->已禁用
													<a style="color: red" href="index.php?admin_editor/status/{$toolbar['id']}/1{$setting['seo_suffix']}">[启用]</a>
												 <!--{/if}-->
                                            </td>
                                        </tr>
                                    </table>
                                </li>
                                <!--{/loop}-->
                            </ul>
                        </td>
                    </tr>
                    <tr class="nobg">
                        <td colspan="4" ><input type="button" class="btn" name="updatebtn" onclick="upeditor();" value="更新编辑器" /></td>
                    </tr>
                </table>

                <script type="text/javascript">
                    function upeditor(){
                        window.location="index.php?admin_editor/upeditor{$setting['seo_suffix']}";
                    }

                    $(document).ready(function() {
                        $("#list").sortable({
                            update : function () {
                                var order="";
                                var numValue=$("input[name='id[]']");
                                for(var i=0;i<numValue.length;i++){
                                    order+=$(numValue[i]).val()+",";
                                }
                                $.post("index.php?admin_editor/order{$setting['seo_suffix']}",{order:order});
                            }
                        });
                    });
                </script>

            </div>
        </div>
    </body>
</html>
